APIs for Hidden Devices
POST /api/v2/devices/purged
Description
Get a list of all hidden devices.
Header Parameters
| Name | Description | Type | Required | Default | 
|---|---|---|---|---|
| Authorization | Bearer API token/key. The format is Bearer <API_key> | String | Yes | |
| orgId | The ID of the organization. The format is OrgId:OrgName | String | Yes | |
| siteId | The ID of the site. The format is SiteId:SiteName | String | Yes | 
Query Parameters
| Name | Description | Type | Required | Default | 
|---|---|---|---|---|
| page | Page number, starting from 1 | String | No | 1 | 
| size | Number of devices per page. Minimum size is 1 | String | No | 10 | 
| sort | Sorting criteria in the format: property, (asc,desc). Multiple sort criteria are supported | String | No | |
| showBillable | Flag for showing/hiding billable subtype. If enabled, the result will contain only a list of billable devices | Boolean | No | false | 
CURL Example
The below code snippet shows an example of the API call, where <NCE-IP>, <ORG-ID>, <SITE-ID> & <API-TOKEN> are variables.
curl --location --request POST 'https://<NCE-IP>/api/v2/devices/purged?page=1&size=25&sort=lastUpdateTime%2CDESC&showBillable=false' \
--header 'orgId: <ORG-ID>' \
--header 'siteId: <SITE-ID>' \
--header 'Authorization: Bearer <API-TOKEN>'
Response
Upon a successful request, the API returns Status code 200. The response model is the same as the response for APIs section.
PUT /api/v2/devices/purge
Description
Hide a device
Header Parameters
| Name | Description | Type | Required | Default | 
|---|---|---|---|---|
| Authorization | Bearer API token/key. The format is Bearer <API_key> | String | Yes | |
| orgId | The ID of the organization. The format is OrgId:OrgName | String | Yes | |
| siteId | The ID of the site. The format is SiteId:SiteName | String | Yes | 
Body Parameters
| Name | Description | Type | Required | Default | 
|---|---|---|---|---|
| deviceIdListPostData | Filter with the device IDs. The format is JSON. Example {"deviceIds": ["<deviceID"]} | Object | Yes | 
CURL Example
The below code snippet shows an example of the API call, where <NCE-IP>, <ORG-ID>, <SITE-ID>, <API-TOKEN> & <DEVICE-ID> are variables.
curl --location --request PUT 'https://<NCE-IP>/api/v2/devices/purge' \
--header 'orgId: <ORG-ID>' \
--header 'siteId: <SITE-ID>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API-TOKEN>' \
--data '{
    "deviceIds": [
        "<DEVICE-ID>"
    ]
}'
Response
Upon a successful request, the API returns Status code 204 No Content.
PUT /api/v2/devices/unpurge
Description
Unhide a device
Header Parameters
| Name | Description | Type | Required | Default | 
|---|---|---|---|---|
| Authorization | Bearer API token/key. The format is Bearer <API_key> | String | Yes | |
| orgId | The ID of the organization. The format is OrgId:OrgName | String | Yes | |
| siteId | The ID of the site. The format is SiteId:SiteName | String | Yes | 
Body Parameters
| Name | Description | Type | Required | Default | 
|---|---|---|---|---|
| deviceIdListPostData | Filter with the device IDs. The format is JSON. Example {"deviceIds": ["<deviceID"]} | Object | Yes | 
CURL Example
The below code snippet shows an example of the API call, where <NCE-IP>, <ORG-ID>, <SITE-ID>, <API-TOKEN> & <DEVICE-ID> are variables.
curl --location --request PUT 'https://<NCE-IP>/api/v2/devices/unpurge' \
--header 'orgId: <ORG-ID>' \
--header 'siteId: <SITE-ID>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <API-TOKEN>' \
--data '{
    "deviceIds": [
        "<DEVICE-ID>"
    ]
}'
Response
Upon a successful request, the API returns Status code 200 OK.